<%-- 
    Document   : profile
    Created on : Mar 6, 2014, 8:00:28 PM
    Author     : kenn
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>

<c:set scope="request" var="title" value="Profile"/>

<sql:setDataSource var="ds" driver="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://localhost/bonix"
                   user="root" password=""/>
  
<sql:query var="profile" dataSource="${ds}">
    SELECT first_name, last_name, bdate, email, contact, description
    from profile
    where username = ?
    <sql:param value="${param.serviceProvider}"/>
    
</sql:query>

<!DOCTYPE html>
<html>
    <jsp:include page="head.jsp"/>

    <body>
        <jsp:include page="header.jsp"/>

        <div class="row">
            <div class="container">
                <div class="content row">

                    <div class="containerService">

                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                <h3 class="panel-title">SERVICE PROVIDER PROFILE</h3>
                            </div>

                            <div class="panel-body">
                                <c:forEach var="pr" items="${profile.rows}">
                                    <form action="acSetting.jsp" method="post">
                                        
                                        <div class="input-group col-lg-7">
                                            <span class="input-group-addon">Name: </span>
                                            <input type="text" class="form-control1" placeholder="Username" value="${pr.first_name} ${pr.last_name}" readonly/>
                                        </div>
                                        <br>
                                        <div class="input-group col-lg-7">
                                            <span class="input-group-addon">Birthday: </span>
                                            <input type="text" class="form-control1" placeholder="Username" value="${pr.bdate}" readonly/>
                                        </div>
                                        <br>
                                        <div class="input-group col-lg-7">
                                            <span class="input-group-addon">Email: </span>
                                            <input type="text" class="form-control1" placeholder="Username" value="${pr.email}" readonly/>
                                        </div>
                                        <br>
                                        <div class="input-group col-lg-7">
                                            <span class="input-group-addon">Contact: </span>
                                            <input type="text" class="form-control1" placeholder="Username" value="${pr.contact}" readonly/>
                                        </div>
                                        <br>
                                        <div class="input-group col-lg-7">
                                            <label>Description:</label>
                                            <textarea class="form-control" name="message" rows="5" cols="50" readonly>${pr.description}</textarea>
                                        </div>
                                    </form>
                                </c:forEach>  
                            </div><!-- END panel-body -->
                        </div><!-- END panel-primary -->

                    </div><!-- END containerService -->

                </div><!-- END CONTENT CONTENT ROW -->
            </div><!-- END CONTAINER -->
        </div><!-- END ROW -->
    </body>
</html>